function onHitCourse() {
    document.getElementById("hitCourse").checked = true;
}

function onAddCourse() {
    window.location.href = "./addCourse.jsp"
    return false;
}

function onTableHeadClick(ele, orderBy) {
    let pageNoStr = GetUrlParam("pageNo");
    let value = ele.innerText.trim();
    if (value.endsWith(document.getElementById("uarr").innerText)) {
        window.location.href = "./allCourse.jsp?pageNo=" + pageNoStr + "&orderBy=" + orderBy + "&descend=true";
    } else if (value.endsWith(document.getElementById("darr").innerText)) {
        window.location.href = "./allCourse.jsp?pageNo=" + pageNoStr;
    } else {
        window.location.href = "./allCourse.jsp?pageNo=" + pageNoStr + "&orderBy=" + orderBy;
    }
}

